<table class="table table-bordered">
    <thead>
        <tr>
            <td width="6%">活动ID</td>
            <td width="12%">名称</td>
            <td width="12%">图片</td>
            <td width="6%">类型</td>
            <td width="12%">开始时间</td>
            <td width="12%">结束时间</td>
            <td width="6%">状态</td>
            <td width="12%">创建时间</td>
            <td width="10%">操作</td>
        </tr>
    </thead>
    <tbody>
    <php>
        $lottory_status_arr = array('1'=>'待上线','2'=>'进行中','3'=>'已结束','4'=>'已下线');
        $lottory_type_arr = array('1'=>'注册抽奖');
    </php>
    <empty name="list">
        <tr class="listBg"><td colspan="9">抱歉，该条件下没有数据</td></tr>
        <else />
        <volist name="list" id="list" key="k">
            <tr class="listBg">
                <td><a href="{:U('Lottory/lottoryTicket',['id'=>$list[id]])}" target="_blank">{$list.id}</a></td>
                <td>{$list.lottory_name}</td>
                <td><img src="{$list.lottory_image}@120w_60h"></td>
                <td>{$lottory_type_arr[$list[lottory_type]]}</td>
                <td>{$list.lottory_start_time}</td>
                <td>{$list.lottory_end_time}</td>
                <td>{$lottory_status_arr[$list[lottory_status]]}</td>
                <td>{$list.create_time}</td>
                <td>
                    <a href="{:U('Lottory/lottoryCheck',['id'=>$list[id]])}" target="_blank">查看</a>
                    <if condition="$list.lottory_status eq 1">
                        <a href="{:U('Lottory/lottoryEdit',['id'=>$list[id]])}">编辑</a>
                        <!--<a href="#"  onclick="return confirm_popup('{$list.id}',2,'{$list.lottory_name}')">上线</a>-->
                    <elseif condition="$list.lottory_status eq 2" />
                        <a href="#" onclick="return confirm_popup('{$list.id}',4,'{$list.lottory_name}')">下线</a>
                    <elseif condition="($list.lottory_status eq 3) AND ($list.lottory_win_num eq 0) AND ($list.lottory_ticket_nums gt 0)" />
                        <a href="#" onclick="return  run_lottery('{$list.id}')">开奖</a>
                    </if>
                </td>
            </tr>
        </volist>
    </empty>
</tbody>
</table>
<div class="pageFaye"><div class="pager">{$page}</div><div class="clear"></div></div>
